<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wwwApp: user/password.php File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">wwwApp
   </div>
   <div id="projectbrief">A web app for workshop organizing, recruitment and qualification</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_111cd2f11cffd6d6d28d89ee0389ee9e.html">user</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">password.php File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="password_8php_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a26fb1747283617276edce7e87b038e96"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a26fb1747283617276edce7e87b038e96">createPasswordHash</a> ($password)</td></tr>
<tr class="memitem:a704bd23035a2de307a0e3d9d8f43c992"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a704bd23035a2de307a0e3d9d8f43c992">validatePassword</a> ($password, $correct_hash)</td></tr>
<tr class="memitem:a08675900fee9288af241a35114c99296"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a08675900fee9288af241a35114c99296">generateRandomPassword</a> ($length)</td></tr>
<tr class="memitem:a6e23a46aba7ce503d2a7dde9f6fb8f19"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a6e23a46aba7ce503d2a7dde9f6fb8f19">passwordNeedsRehash</a> ($hash)</td></tr>
<tr class="memitem:af68819f8ca673471e7dc3c0af669284a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#af68819f8ca673471e7dc3c0af669284a">slow_equals</a> ($a, $b)</td></tr>
<tr class="memitem:a92d86c913c13d2e2fda8418c7389c16a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a92d86c913c13d2e2fda8418c7389c16a">pbkdf2</a> ($algorithm, $password, $salt, $count, $key_length, $raw_output=false)</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a288b3a49ca71e24e0f8c7fbf851999da"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a288b3a49ca71e24e0f8c7fbf851999da">PBKDF2_HASH_ALGORITHM</a> = &quot;sha512&quot;</td></tr>
<tr class="memitem:a1c828dd8ae0d5bd2b03f11c4b5eb2532"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a1c828dd8ae0d5bd2b03f11c4b5eb2532">PBKDF2_ITERATIONS</a> = 1000</td></tr>
<tr class="memitem:a944e7ae7b0664bcd501cfd6f17cbcce0"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a944e7ae7b0664bcd501cfd6f17cbcce0">PBKDF2_SALT_BYTE_SIZE</a> = 48</td></tr>
<tr class="memitem:adc661170f688302b0d0d4da74055a19e"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#adc661170f688302b0d0d4da74055a19e">PBKDF2_HASH_BYTE_SIZE</a> = 48</td></tr>
<tr class="memitem:a788fe3ca854015dcdd07b9f192a4a3bf"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a788fe3ca854015dcdd07b9f192a4a3bf">HASH_SECTIONS</a> = 4</td></tr>
<tr class="memitem:a136504e82564d4e4c730a0136eedaf2a"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a136504e82564d4e4c730a0136eedaf2a">HASH_ALGORITHM_INDEX</a> = 0</td></tr>
<tr class="memitem:aa35c2b34bef45502f6b9de73dcdde662"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#aa35c2b34bef45502f6b9de73dcdde662">HASH_ITERATION_INDEX</a> = 1</td></tr>
<tr class="memitem:a3a70c05a23d1156d5e1798114ba4f068"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a3a70c05a23d1156d5e1798114ba4f068">HASH_SALT_INDEX</a> = 2</td></tr>
<tr class="memitem:a5cf33fff05e1dd64472645f3ff29e6ff"><td class="memItemLeft" align="right" valign="top">const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="password_8php.html#a5cf33fff05e1dd64472645f3ff29e6ff">HASH_PBKDF2_INDEX</a> = 3</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a26fb1747283617276edce7e87b038e96"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">createPasswordHash </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$password</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00024">24</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="user_8php_source.html#l00262">actionChangePassword()</a>, <a class="el" href="user_8php_source.html#l00081">actionLogin()</a>, <a class="el" href="user_8php_source.html#l00293">actionPasswordReset()</a>, and <a class="el" href="user_8php_source.html#l00173">actionRegister()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="comment">// format: algorithm:iterations:salt:hash</span></div>
<div class="line">        $salt = base64_encode(mcrypt_create_iv(<a class="code" href="password_8php.html#a944e7ae7b0664bcd501cfd6f17cbcce0">PBKDF2_SALT_BYTE_SIZE</a>, MCRYPT_DEV_URANDOM));</div>
<div class="line">        <span class="keywordflow">return</span> <a class="code" href="password_8php.html#a288b3a49ca71e24e0f8c7fbf851999da">PBKDF2_HASH_ALGORITHM</a> . <span class="stringliteral">&quot;:&quot;</span> . <a class="code" href="password_8php.html#a1c828dd8ae0d5bd2b03f11c4b5eb2532">PBKDF2_ITERATIONS</a> . <span class="stringliteral">&quot;:&quot;</span> .  $salt . <span class="stringliteral">&quot;:&quot;</span> . </div>
<div class="line">                base64_encode(<a class="code" href="password_8php.html#a92d86c913c13d2e2fda8418c7389c16a">pbkdf2</a>(</div>
<div class="line">                        <a class="code" href="password_8php.html#a288b3a49ca71e24e0f8c7fbf851999da">PBKDF2_HASH_ALGORITHM</a>,</div>
<div class="line">                        <a class="code" href="config_8php_8template.html#ac555f45675f5c7f30bdd1c54e441e3f2">PASSWORD_SALT</a> . $password,</div>
<div class="line">                        $salt,</div>
<div class="line">                        <a class="code" href="password_8php.html#a1c828dd8ae0d5bd2b03f11c4b5eb2532">PBKDF2_ITERATIONS</a>,</div>
<div class="line">                        <a class="code" href="password_8php.html#adc661170f688302b0d0d4da74055a19e">PBKDF2_HASH_BYTE_SIZE</a>,</div>
<div class="line">                        <span class="keyword">true</span></div>
<div class="line">                ));</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a08675900fee9288af241a35114c99296"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">generateRandomPassword </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$length</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00068">68</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="user_8php_source.html#l00293">actionPasswordReset()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        $random = mcrypt_create_iv(<a class="code" href="password_8php.html#a944e7ae7b0664bcd501cfd6f17cbcce0">PBKDF2_SALT_BYTE_SIZE</a>, MCRYPT_DEV_URANDOM);</div>
<div class="line">        <span class="keywordflow">return</span> substr(sha1(base64_encode($random)), 0, $length);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a6e23a46aba7ce503d2a7dde9f6fb8f19"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">passwordNeedsRehash </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$hash</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00074">74</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="user_8php_source.html#l00081">actionLogin()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        $params = explode(<span class="stringliteral">&quot;:&quot;</span>, $hash);</div>
<div class="line">        <span class="keywordflow">if</span> (count($params) &lt; <a class="code" href="password_8php.html#a788fe3ca854015dcdd07b9f192a4a3bf">HASH_SECTIONS</a>)</div>
<div class="line">                <span class="keywordflow">return</span> <span class="keyword">true</span>; </div>
<div class="line">        <span class="keywordflow">if</span> ($params[<a class="code" href="password_8php.html#a136504e82564d4e4c730a0136eedaf2a">HASH_ALGORITHM_INDEX</a>] === <span class="stringliteral">&#39;old&#39;</span>)</div>
<div class="line">                <span class="keywordflow">return</span> <span class="keyword">true</span>; </div>
<div class="line">        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a92d86c913c13d2e2fda8418c7389c16a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pbkdf2 </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$salt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$key_length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$raw_output</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00110">110</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00024">createPasswordHash()</a>, and <a class="el" href="password_8php_source.html#l00039">validatePassword()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        $algorithm = strtolower($algorithm);</div>
<div class="line">        <span class="keywordflow">if</span>(!in_array($algorithm, hash_algos(), <span class="keyword">true</span>))</div>
<div class="line">                die(<span class="stringliteral">&#39;PBKDF2 ERROR: Invalid hash algorithm.&#39;</span>);</div>
<div class="line">        <span class="keywordflow">if</span>($count &lt;= 0 || $key_length &lt;= 0)</div>
<div class="line">                die(<span class="stringliteral">&#39;PBKDF2 ERROR: Invalid parameters.&#39;</span>);</div>
<div class="line"></div>
<div class="line">        $hash_length = strlen(hash($algorithm, <span class="stringliteral">&quot;&quot;</span>, <span class="keyword">true</span>));</div>
<div class="line">        $block_count = ceil($key_length / $hash_length);</div>
<div class="line"></div>
<div class="line">        $output = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line">        <span class="keywordflow">for</span>($i = 1; $i &lt;= $block_count; $i++) {</div>
<div class="line">                <span class="comment">// $i encoded as 4 bytes, big endian.</span></div>
<div class="line">                $last = $salt . pack(<span class="stringliteral">&quot;N&quot;</span>, $i);</div>
<div class="line">                <span class="comment">// first iteration</span></div>
<div class="line">                $last = $xorsum = hash_hmac($algorithm, $last, $password, <span class="keyword">true</span>);</div>
<div class="line">                <span class="comment">// perform the other $count - 1 iterations</span></div>
<div class="line">                <span class="keywordflow">for</span> ($j = 1; $j &lt; $count; $j++) {</div>
<div class="line">                        $xorsum ^= ($last = hash_hmac($algorithm, $last, $password, <span class="keyword">true</span>));</div>
<div class="line">                }</div>
<div class="line">                $output .= $xorsum;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span>($raw_output)</div>
<div class="line">                <span class="keywordflow">return</span> substr($output, 0, $key_length);</div>
<div class="line">        <span class="keywordflow">else</span></div>
<div class="line">                <span class="keywordflow">return</span> bin2hex(substr($output, 0, $key_length));</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af68819f8ca673471e7dc3c0af669284a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">slow_equals </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00085">85</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00039">validatePassword()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        $diff = strlen($a) ^ strlen($b);</div>
<div class="line">        <span class="keywordflow">for</span>($i = 0; $i &lt; strlen($a) &amp;&amp; $i &lt; strlen($b); $i++)</div>
<div class="line">        {</div>
<div class="line">                $diff |= ord($a[$i]) ^ ord($b[$i]);</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">return</span> $diff === 0; </div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a704bd23035a2de307a0e3d9d8f43c992"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">validatePassword </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$correct_hash</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00039">39</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="user_8php_source.html#l00262">actionChangePassword()</a>, and <a class="el" href="user_8php_source.html#l00081">actionLogin()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="comment">// DEPRECATED: The root password is hashed this way so it can be set in config.php,</span></div>
<div class="line">        <span class="comment">// installation scripts only have to write &#39;rootpassword&#39; instead of a sha1().</span></div>
<div class="line">        <span class="comment">//if ($correct_hash === &#39;rootpassword&#39;)</span></div>
<div class="line">        <span class="comment">//      return slow_equals(ROOT_PASSWORD, $password);</span></div>
<div class="line">        </div>
<div class="line">        $params = explode(<span class="stringliteral">&quot;:&quot;</span>, $correct_hash);</div>
<div class="line">        <span class="keywordflow">if</span> (count($params) &lt; <a class="code" href="password_8php.html#a788fe3ca854015dcdd07b9f192a4a3bf">HASH_SECTIONS</a>)</div>
<div class="line">                <span class="keywordflow">return</span> <span class="keyword">false</span>; </div>
<div class="line"></div>
<div class="line">        <span class="comment">// DEPRECATED: Accept old passwords</span></div>
<div class="line">        <span class="keywordflow">if</span> ($params[<a class="code" href="password_8php.html#a136504e82564d4e4c730a0136eedaf2a">HASH_ALGORITHM_INDEX</a>] === <span class="stringliteral">&#39;old&#39;</span>)</div>
<div class="line">                <span class="keywordflow">return</span> <a class="code" href="password_8php.html#af68819f8ca673471e7dc3c0af669284a">slow_equals</a>($params[<a class="code" href="password_8php.html#a5cf33fff05e1dd64472645f3ff29e6ff">HASH_PBKDF2_INDEX</a>], sha1(OLD_PASSWORD_SALT . $password));</div>
<div class="line"></div>
<div class="line">        $pbkdf2 = base64_decode($params[HASH_PBKDF2_INDEX]);</div>
<div class="line">        <span class="keywordflow">return</span> <a class="code" href="password_8php.html#af68819f8ca673471e7dc3c0af669284a">slow_equals</a>(</div>
<div class="line">                $pbkdf2,</div>
<div class="line">                <a class="code" href="password_8php.html#a92d86c913c13d2e2fda8418c7389c16a">pbkdf2</a>(</div>
<div class="line">                        $params[<a class="code" href="password_8php.html#a136504e82564d4e4c730a0136eedaf2a">HASH_ALGORITHM_INDEX</a>],</div>
<div class="line">                        <a class="code" href="config_8php_8template.html#ac555f45675f5c7f30bdd1c54e441e3f2">PASSWORD_SALT</a> . $password,</div>
<div class="line">                        $params[<a class="code" href="password_8php.html#a3a70c05a23d1156d5e1798114ba4f068">HASH_SALT_INDEX</a>],</div>
<div class="line">                        (<span class="keywordtype">int</span>)$params[<a class="code" href="password_8php.html#aa35c2b34bef45502f6b9de73dcdde662">HASH_ITERATION_INDEX</a>],</div>
<div class="line">                        strlen($pbkdf2),</div>
<div class="line">                        <span class="keyword">true</span></div>
<div class="line">                )</div>
<div class="line">        );</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a136504e82564d4e4c730a0136eedaf2a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const HASH_ALGORITHM_INDEX = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00019">19</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00074">passwordNeedsRehash()</a>, and <a class="el" href="password_8php_source.html#l00039">validatePassword()</a>.</p>

</div>
</div>
<a class="anchor" id="aa35c2b34bef45502f6b9de73dcdde662"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const HASH_ITERATION_INDEX = 1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00020">20</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00039">validatePassword()</a>.</p>

</div>
</div>
<a class="anchor" id="a5cf33fff05e1dd64472645f3ff29e6ff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const HASH_PBKDF2_INDEX = 3</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00022">22</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00039">validatePassword()</a>.</p>

</div>
</div>
<a class="anchor" id="a3a70c05a23d1156d5e1798114ba4f068"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const HASH_SALT_INDEX = 2</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00021">21</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00039">validatePassword()</a>.</p>

</div>
</div>
<a class="anchor" id="a788fe3ca854015dcdd07b9f192a4a3bf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const HASH_SECTIONS = 4</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00018">18</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00074">passwordNeedsRehash()</a>, and <a class="el" href="password_8php_source.html#l00039">validatePassword()</a>.</p>

</div>
</div>
<a class="anchor" id="a288b3a49ca71e24e0f8c7fbf851999da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const PBKDF2_HASH_ALGORITHM = &quot;sha512&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00013">13</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00024">createPasswordHash()</a>.</p>

</div>
</div>
<a class="anchor" id="adc661170f688302b0d0d4da74055a19e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const PBKDF2_HASH_BYTE_SIZE = 48</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00016">16</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00024">createPasswordHash()</a>.</p>

</div>
</div>
<a class="anchor" id="a1c828dd8ae0d5bd2b03f11c4b5eb2532"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const PBKDF2_ITERATIONS = 1000</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00014">14</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00024">createPasswordHash()</a>.</p>

</div>
</div>
<a class="anchor" id="a944e7ae7b0664bcd501cfd6f17cbcce0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const PBKDF2_SALT_BYTE_SIZE = 48</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="password_8php_source.html#l00015">15</a> of file <a class="el" href="password_8php_source.html">password.php</a>.</p>

<p>Referenced by <a class="el" href="password_8php_source.html#l00024">createPasswordHash()</a>, and <a class="el" href="password_8php_source.html#l00068">generateRandomPassword()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Sep 8 2013 17:44:57 for wwwApp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
